package dth.entity;

import java.sql.Date;

import javax.faces.bean.NoneScoped;
import javax.persistence.*;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@Entity
@Table(name="order_setup_box")
public class OrderSetupBox {
	@Id
	@Column(columnDefinition="int",name="id")
	private int id;
	@Transient
	private int fkDistributorId;
	@Transient
	private int fkDealerId;
	@Column(columnDefinition="int",name="fk_setup_box")
	private int fkSetupBox;
	@Transient
	private int fkUserId;
	@Column(columnDefinition="datetime",name="date_insert")
	private Date dateInsert;
	@Column(columnDefinition="int",name="quantity")
	private int quantity;
	@Column(columnDefinition="int",name="status")
	private int status;
	@Column(columnDefinition="double",name="price")
	private double priceSTB;
	@Column(columnDefinition="varchar",name="setupboxtype")
	private String typeSTB;
	@Column(columnDefinition="date",name="date_payment")
	private Date datePay;
	
	
	@NotFound(action=NotFoundAction.IGNORE)
	@ManyToOne
	@JoinColumn(name = "fk_user_id")
	private User ownUserOrderSetupBox;
	@NotFound(action=NotFoundAction.IGNORE)
	@ManyToOne
	@JoinColumn(name = "fk_distributor_id")
	private Distributor ownDistributor;
	@NotFound(action=NotFoundAction.IGNORE)
	@ManyToOne
	@JoinColumn(name = "fk_dealer_id")
	private Dealer ownDealer;
	
	
	
	public Distributor getOwnDistributor() {
		return ownDistributor;
	}

	public void setOwnDistributor(Distributor ownDistributor) {
		this.ownDistributor = ownDistributor;
	}

	public Dealer getOwnDealer() {
		return ownDealer;
	}

	public void setOwnDealer(Dealer ownDealer) {
		this.ownDealer = ownDealer;
	}

	public Date getDatePay() {
		return datePay;
	}

	public void setDatePay(Date datePay) {
		this.datePay = datePay;
	}

	public double getPriceSTB() {
		return priceSTB;
	}

	public void setPriceSTB(double priceSTB) {
		this.priceSTB = priceSTB;
	}

	

	public String getTypeSTB() {
		return typeSTB;
	}

	public void setTypeSTB(String typeSTB) {
		this.typeSTB = typeSTB;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	public int getFkDistributorId() {
		return fkDistributorId;
	}
	public void setFkDistributorId(int fkDistributorId) {
		this.fkDistributorId = fkDistributorId;
	}
	public int getFkDealerId() {
		return fkDealerId;
	}
	public void setFkDealerId(int fkDealerId) {
		this.fkDealerId = fkDealerId;
	}
	public int getFkSetupBox() {
		return fkSetupBox;
	}
	public void setFkSetupBox(int fkSetupBox) {
		this.fkSetupBox = fkSetupBox;
	}
	public int getFkUserId() {
		return fkUserId;
	}
	public void setFkUserId(int fkUserId) {
		this.fkUserId = fkUserId;
	}
	public Date getDateInsert() {
		return dateInsert;
	}
	public void setDateInsert(Date dateInsert) {
		this.dateInsert = dateInsert;
	}

	public User getOwnUserOrderSetupBox() {
		return ownUserOrderSetupBox;
	}

	public void setOwnUserOrderSetupBox(User ownUserOrderSetupBox) {
		this.ownUserOrderSetupBox = ownUserOrderSetupBox;
	}
	
	
}
